<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('home');
    $router->get('/system', 'SystemController@index');
    $router->post('/system', 'SystemController@store');

    $router->get('/group', 'GroupController@index');
    $router->post('/group', 'GroupController@store');

    $router->get('/groups', 'GroupsController@index');
    $router->post('/groups', 'GroupsController@store');
    $router->get('/groups/create', 'GroupsController@create');
    $router->get('/groups/{id}/edit', 'GroupsController@edit');
    $router->post('/groups/{id}', 'GroupsController@edit');

    $router->get('/message', 'MessageController@index');

    $router->get('/circle/sended', 'CircleController@sended');
    $router->get('/circle/wait', 'CircleController@wait');
    $router->delete('/circle/wait/{ids}', 'CircleController@multidelete');
    $router->get('/send/sended', 'SendController@sended');
    $router->get('/send/wait', 'SendController@wait');
    $router->delete('/send/wait/{ids}', 'SendController@multidelete');

    $router->get('/robots', 'RobotsController@index');
    $router->get('/robots/wakeup', 'RobotsController@wakeup');
    $router->get('/robots/qrcode', 'RobotsController@qrcode');
    $router->get('/robots/checklogin', 'RobotsController@checklogin');

    $router->get('/agents', 'AgentsController@index');
    $router->get('/agents/create', 'AgentsController@create');
    $router->post('/agents/create', 'AgentsController@store');
    $router->get('/agents/{id}/edit', 'AgentsController@edit');
    $router->post('/agents/{id}', 'AgentsController@edit');

    $router->get("/spider/taobao", "SpiderController@taobao");
    $router->post("/spider/taobao", "SpiderController@taobao");
    $router->get("/spider/jd", "SpiderController@jd");
    $router->post("/spider/jd", "SpiderController@jd");
    $router->get("/spider/pdd", "SpiderController@pdd");
    $router->post("/spider/pdd", "SpiderController@pdd");

});
